<?php
/**
 * @version		$Id: default.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Site
 * @subpackage	mod_articles_latest
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>

<ul >
<?php foreach ($list as $k => $item) :  ?>

	<li class="<?php if($k == count($list)-1) echo "nobg"; ?>">
	                                            <div class="thumb2" >
												
															<?php		
															$arr2 = preg_split('/<(IMG|img) /', $item->introtext);
															$arr3 = preg_split('/src=\"/', $arr2[1]);
															$arr4 = preg_split('/\"/', $arr3[1]);
															if(preg_match('/http:/', $arr4[0]))
															{
																$result = $arr4[0];
															}
															else if(preg_match('/^\//', $arr4[0])){
																$result = $u2 . substr($arr4[0],1);
															}
															else
															{
																for($ei = 3; $ei < sizeof($u1) - 1; $ei++)
																{
															
												$u2 .= $u1[$ei] . "/";
																}
																$result = $u2 . $arr4[0];
															}
														  ?>
														  
														  
												<img src="<?php if ($result=="") 
																					echo JURI::base()."/templates/tpmsolutions/images/noimg1.jpg";
																					else echo $result; ?>" alt="" class="slider_img" title=""  class="imagecache imagecache-938x240" />
												
												
												
												
												
												</div> 
                                                <div class="description">
                                                	<h6 style="font-size:12px"><a href="<?php echo $item->link; ?>">
                                                            
															<?php						
															$words = explode(" ", $item->title);
															if(count($words) > 8)
															{
																for($i=0;$i<=8;$i++)
																{
																	echo $words[$i]." ";
																}
																echo "...";
															}
															else
															{
																echo $item->title;
															}
															?>
                                                     </a></h6>       
                                                </div>
	</li>
<?php endforeach; ?>
</ul>